using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using Husb.Data;
using Husb.Util;
using CentralOffice.MyTable.Data;
using CentralOffice.MyTable.BusinessActions;
using DiaryTable = CentralOffice.MyTable.Data.DiaryDataSet.diaryDataTable;
using DiaryRow = CentralOffice.MyTable.Data.DiaryDataSet.diaryRow;
namespace CentralOffice.WebClient.desktop.diary
{
    public partial class shareread : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                odsDiary.SelectParameters["whereClause"].DefaultValue = " ToId like '%" + ApplicationContext.ActualUserId + "%' and deleteflag=0";
                odsDiary.SelectParameters["orderBy"].DefaultValue = " LastCommentTime DESC";
            }
        }

        protected void gv_Diary_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                DiaryRow drow = ((DataRowView)e.Row.DataItem).Row as DiaryRow;
                e.Row.Cells[0].Attributes.Add("onmousemove", "javascript:moveinfo();");
                e.Row.Cells[0].Attributes.Add("onmouseover", "javascript:showinfo(this,'" + drow.DiaContent + "');");
                e.Row.Cells[0].Attributes.Add("onmouseout", "javascript:clearinfo();");

            }
        }
    }
}
